The invention relates generally to backup copies of database indices and more particularly to making compressed copies of in-use compressed database indices.
For some time, database management systems (DBMS) have provided the option to retain data in a compressed format on storage devices. More recently, some database systems such as DB2® for z/OS, have started providing an option to store index data on storage devices in compressed format as well. (DB2 is a registered trademark of the International Business Machines Corporation.)
Because database indices are frequently accessed concurrently by multiple users, database management systems often retain some index pages in working memory (i.e., those pages currently being accessed by the users). To be available for access, pages must normally be uncompressed. Accordingly, index pages are typically uncompressed as they are brought into working memory from an external storage device such as a network coupled file server.
As part of a database management systems' normal operations, backup copies of indices are frequently made for recovery purposes. Known prior art methods of making backup copies of in-use compressed database indices bring each page of the target index into working memory, uncompress if and write if out to a backup data set(s) or file(s)—in uncompressed format. During these operations, uncompressed versions of the Index pages currently in working memory (i.e., those available for immediate access by users) are locked while the uncompressed pages are written to the backup data set(s) or file(s). While locked, the pages may he mad accessed, but cannot he updated. Thus, the locks can block user actions—that is, prior art techniques utilize locks and are, therefore, obtrusive to user actions.
These prior approaches require time to bring each compressed page into working memory, processor time to uncompress the pages, time to write each uncompressed page to a backup copy file(s) and block users from updating currently in-use pages because of the use of locks. In addition, because the backup copies are m an uncompressed format they can require a substantial amount of memory to store (e.g., on an external storage device). Thus, it would be beneficial to provide a mechanism to backup in-use compressed database indices that avoid these drawbacks.